using System;
using System.ComponentModel;
using System.Linq;

using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

namespace ApiTest2.Entitys
{
    /// <summary>
    /// 系统组件
    /// </summary>  
    /// <remarks>
    /// <![CDATA[ENGINE=InnoDB  COMMENT='系统组件']]>
    /// </remarks>
    [DbSource("Default"), Serializable]
    public class AppComponent
    {
        /// <summary>
        /// component_id
        /// </summary>
        /// <remarks>
        /// <![CDATA[int NOT NULL COMMENT '']]>
        /// </remarks>
        [Primary(Automatic = true)]
        public int ComponentId { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        /// <remarks>
        /// <![CDATA[varchar(64) DEFAULT NULL COMMENT '名称']]>
        /// </remarks>
        [Column(64)]
        [DisplayName("名称")]
        public string ComponentName { get; set; }

        /// <summary>
        /// 代号
        /// </summary>
        /// <remarks>
        /// <![CDATA[varchar(64) DEFAULT NULL COMMENT '代号']]>
        /// </remarks>
        [Column(64)]
        [DisplayName("代号")]
        public string ComponentCode { get; set; }

        /// <summary>
        /// 组件图标
        /// </summary>
        /// <remarks>
        /// <![CDATA[varchar(64) DEFAULT NULL COMMENT '组件图标']]>
        /// </remarks>
        [Column(64)]
        [DisplayName("组件图标")]
        public string ImgIcon { get; set; }

        /// <summary>
        /// 不可修改的
        /// </summary>
        /// <remarks>
        /// <![CDATA[bit(1) NOT NULL COMMENT '不可修改的']]>
        /// </remarks>
        [Column(1, false)]
        [DisplayName("不可修改的")]
        public bool IsReadonly { get; set; }

        /// <summary>
        /// 远程查询
        /// </summary>
        /// <remarks>
        /// <![CDATA[bit(1) NOT NULL COMMENT '远程查询']]>
        /// </remarks>
        [Column(1, false)]
        [DisplayName("远程查询")]
        public bool IsRemote { get; set; }

        /// <summary>
        /// 远程接口
        /// </summary>
        /// <remarks>
        /// <![CDATA[varchar(255) DEFAULT NULL COMMENT '远程接口']]>
        /// </remarks>
        [Column(255)]
        [DisplayName("远程接口")]
        public string RemoteApi { get; set; }

        /// <summary>
        /// post_data
        /// </summary>
        /// <remarks>
        /// <![CDATA[varchar(512) DEFAULT NULL COMMENT '']]>
        /// </remarks>
        [Column(512)]
        public string PostData { get; set; }

        /// <summary>
        /// 最大数量
        /// </summary>
        /// <remarks>
        /// <![CDATA[int NOT NULL COMMENT '最大数量']]>
        /// </remarks>
        [Column(false)]
        [DisplayName("最大数量")]
        public int MaxCount { get; set; }

        /// <summary>
        /// sort
        /// </summary>
        /// <remarks>
        /// <![CDATA[int NOT NULL COMMENT '']]>
        /// </remarks>
        [Column(false)]
        public int Sort { get; set; }

    }
}
